92 research outputs found
A Meta-theory for Big-step Semantics
It is well-known that big-step semantics is not able to distinguish stuck and non-terminating computations. This is a strong limitation
as it makes very difficult to reason about properties involving infinite computations, such as type soundness, which cannot even be
expressed.
We show that this issue is only apparent: the distinction between stuck and diverging computations is implicit in any big-step
semantics and it just needs to be uncovered. To achieve this goal, we develop a systematic study of big-step semantics: we introduce
an abstract definition of what a big-step semantics is, we define a notion of computation by formalising the evaluation algorithm
implicitly associated with any big-step semantics, and we show how to canonically extend a big-step semantics to characterise stuck
and diverging computations.
Building on these notions, we describe a general proof technique to show that a predicate is sound, that is, it prevents stuck
computation, with respect to a big-step semantics. One needs to check three properties relating the predicate and the semantics and,
if they hold, the predicate is sound. The extended semantics are essential to establish this meta-logical result, but are of no concerns
to the user, who only needs to prove the three properties of the initial big-step semantics. Finally, we illustrate the technique by
several examples, showing that it is applicable also in cases where subject reduction does not hold, hence the standard technique for
small-step semantics cannot be used
Quantitative Equality in Substructural Logic via Lipschitz Doctrines
Substructural logics naturally support a quantitative interpretation of
formulas, as they are seen as consumable resources. Distances are the
quantitative counterpart of equivalence relations: they measure how much two
objects are similar, rather than just saying whether they are equivalent or
not. Hence, they provide the natural choice for modelling equality in a
substructural setting. In this paper, we develop this idea, using the
categorical language of Lawvere's doctrines. We work in a minimal fragment of
Linear Logic enriched by graded modalities, which are needed to write a
resource sensitive substitution rule for equality, enabling its quantitative
interpretation as a distance. We introduce both a deductive calculus and the
notion of Lipschitz doctrine to give it a sound and complete categorical
semantics. The study of 2-categorical properties of Lipschitz doctrines
provides us with a universal construction, which generates examples based for
instance on metric spaces and quantitative realisability. Finally, we show how
to smoothly extend our results to richer substructural logics, up to full
Linear Logic with quantifiers
Ain't No Stopping Us Monitoring Now
Not all properties are monitorable. This is a well-known fact, and it means
there exist properties that cannot be fully verified at runtime. However, given
a non-monitorable property, a monitor can still be synthesised, but it could
end up in a state where no verdict will ever be concluded on the satisfaction
(resp., violation) of the property. For this reason, non-monitorable properties
are usually discarded. In this paper, we carry out an in-depth analysis on
monitorability, and how non-monitorable properties can still be partially
verified. We present our theoretical results at a semantic level, without
focusing on a specific formalism. Then, we show how our theory can be applied
to achieve partial runtime verification of Linear Temporal Logic (LTL)
Robustness in Metric Spaces over Continuous Quantales and the Hausdorff-Smyth Monad
Generalized metric spaces are obtained by weakening the requirements (e.g.,
symmetry) on the distance function and by allowing it to take values in
structures (e.g., quantales) that are more general than the set of non-negative
real numbers. Quantale-valued metric spaces have gained prominence due to their
use in quantitative reasoning on programs/systems, and for defining various
notions of behavioral metrics.
We investigate imprecision and robustness in the framework of quantale-valued
metric spaces, when the quantale is continuous. In particular, we study the
relation between the robust topology, which captures robustness of analyses,
and the Hausdorff-Smyth hemi-metric. To this end, we define a preorder-enriched
monad , called the Hausdorff-Smyth monad, and when is a
continuous quantale and is a -metric space, we relate the topology
induced by the metric on with the robust topology on the
powerset defined in terms of the metric on .Comment: 19 pages, 1 figur
Flexible Coinduction in Agda
We provide an Agda library for inference systems, also supporting their recent generalization allowing flexible coinduction, that is, interpretations which are neither inductive, nor purely coinductive. A specific inference system can be obtained as an instance by writing a set of meta-rules, in an Agda format which closely resembles the usual one. In this way, the user gets for free the related properties, notably the inductive and coinductive intepretation and the corresponding proof principles. Moreover, a significant modularity is achieved. Indeed, rather than being defined from scratch and with a built-in interpretation, an inference system can also be obtained by composition operators, such as union and restriction to a smaller universe, and its semantics can be modularly chosen as well. In particular, flexible coinduction is obtained by composing in a certain way the interpretations of two inference systems. We illustrate the use of the library by several examples. The most significant one is a big-step semantics for the ?-calculus, where flexible coinduction allows to obtain a special result (?) for all and only the diverging computations, and the proof of equivalence with small-step semantics is carried out by relying on the proof principles offered by the library
Modeling Infinite Behaviour by Corules
open3openDavide Ancona; Francesco Dagnino; Elena ZuccaAncona, Davide; Dagnino, Francesco; Zucca, Elen
Deconfined Global Types for Asynchronous Sessions
Multiparty sessions with asynchronous communications and global types play an important role for the modelling of interaction protocols in distributed systems. In designing such calculi the aim is to enforce, by typing, good properties for all participants, maximising, at the same time, the accepted behaviours. Our type system improves the state-of-the-art by typing all asynchronous sessions and preserving the key properties of Subject Reduction, Session Fidelity and Progress when some well-formedness conditions are satisfied.
The type system comes together with a sound and complete type inference algorithm.
The well-formedness conditions are undecidable, but an algorithm checking an expressive restriction of them recovers the effectiveness of typing
Multi-graded Featherweight Java
Resource-aware type systems statically approximate not only the expected
result type of a program, but also the way external resources are used, e.g.,
how many times the value of a variable is needed. We extend the type system of
Featherweight Java to be resource-aware, parametrically on an arbitrary grade
algebra modeling a specific usage of resources. We prove that this type system
is sound with respect to a resource-aware version of reduction, that is, a
well-typed program has a reduction sequence which does not get stuck due to
resource consumption. Moreover, we show that the available grades can be
heterogeneous, that is, obtained by combining grades of different kinds, via a
minimal collection of homomorphisms from one kind to another. Finally, we show
how grade algebras and homomorphisms can be specified as Java classes, so that
grade annotations in types can be written in the language itself
- …